1.安装必须的组件
composer global require "fxp/composer-asset-plugin:~1.1.1"

2.创建项目composer create-project --prefer-dist yiisoft/yii2-app-basic demo2

3.启动服务
php -S localhost:8080 -t web
php yii serve --port=8888

4.启动报错
yii\web\Request::cookieValidationKey must be configured with a secret key.
需要在文件
D:\code\php_laravel\demo2\config\web.php
中设置
'cookieValidationKey' => 'zxx99',

报错
The file or directory to be published does not exist: D:\code\php_laravel\demo2\vendor\bower/jquery/dist
需要运行
composer global require "fxp/composer-asset-plugin:~1.1.1"
没有办法，重新安装步骤生成项目

github token
204ad76317c6fefedcf0f8c94b6a807a8398e968

清除缓存
composer clearcache

=================================================================================
= 重新安装yii官网的教程
= http://www.yiiframework.com/doc-2.0/guide-start-installation.html
=================================================================================
yii官网已经更新
composer global require "fxp/composer-asset-plugin:^1.3.1"
composer create-project --prefer-dist yiisoft/yii2-app-basic demo2